import request from "../utils/request.js"

export function category(data){
	return request({
		url: "/category",
		method: "post",
		data
	})
}

export function booklist(data){
	return request({
		url: "/booklist",
		method: "post",
		data
	})
}


export function bookdetailed(id){
	return request({
		url: `/bookdetailed?id=${id}`,
		method: "get",
		params: {}
	})
}


/**
 * 借阅
 */
export function borrowBook(data){
	return request({
		url: '/borrowBook',
		method: "post",
		data
	})
}


/**
 * 借阅
 */
export function borrowlist(data){
	return request({
		url: '/borrowlist',
		method: "post",
		data
	})
}



/**
 * 还书
 */
export function returnBook(data){
	return request({
		url: '/returnBook',
		method: "post",
		data
	})
}


/**
 * 申请退款
 */
export function apply(data){
	return request({
		url: '/apply',
		method: "post",
		data
	})
}
